<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/global/email" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>{$Think.lang.emailConfig}</h1>
    </div>

    <div class="form">
      <form id="J_form" method="post" action="{:URL('admin/Global/email')}">
        <dl class="kv">
          <dt>
            <label>{$Think.lang.emailSendType}：</label>
          </dt>
          <dd>
            <select name="email_sendtype" id="J_type">
              <option value="smtp" <eq name="email_sendtype" value="smtp">selected</eq>>smtp</option>
              <option value="mail" <eq name="email_sendtype" value="mail">selected</eq>>Mail</option>
            </select>
            <p class="tip">{$Think.lang.emailSendTypeRemark}</p>
          </dd>
        </dl>

        <div id="J_smtpSettings" <eq name="email_sendtype" value="mail">style="display:none"</eq>>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.smtpAddress}：</label>
            </dt>
            <dd>
              <select name="email_host_1" id="J_smtps" data-value="{$email_host_1}" style="width: 140px">
              </select>
              <input class="input-text" name="email_host" id="email_host" value="{$email_host}" <neq name="email_host_1" value="other">style="display:none;"</neq>/>
              <p class="tip">{$Think.lang.smtpAddressRemark}</p>
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.openSsl}：</label>
            </dt>
            <dd>
              <label>
                <input type="radio" name="email_ssl" id="email_ssl_1" value="1" <eq name="email_ssl" value="1">checked</eq>>是</label>
              <label>
                <input type="radio" name="email_ssl" id="email_ssl_0" value="0" <eq name="email_ssl" value="0">checked</eq>>否</label>
              <p class="tip">{$Think.lang.openSslRemark}</p>
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.emailPort}：</label>
            </dt>
            <dd>
              <input type="number" min="0" class="input-text" name="email_port" id="email_port" value="{$email_port}" />
              <p class="tip">{$Think.lang.emailPortRemark}</p>
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.emailSslEncrypt}：</label>
            </dt>
            <dd>
              <input class="input-text" name="email_ssl_encrypt" type="text" id="email_ssl_encrypt" value="{$email_ssl_encrypt}" />
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.emailAddress}：</label>
            </dt>
            <dd>
              <input type="email" name="email_account" id="email_account" class="input-text" value="{$email_account}" />
              <div class="kv-error"></div>
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.emailPassword}：</label>
            </dt>
            <dd>
              <input class="input-text" type="text" name="email_password" id="email_password" value="{$email_password}" />
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>登录帐号：</label>
            </dt>
            <dd>
              <input class="input-text" name="email_loginName" type="text" value="{$email_loginName}" />
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.emailSenderName}：</label>
            </dt>
            <dd>
              <input class="input-text" name="email_sender_name" type="text" id="email_sender_name" value="{$email_sender_name}" />
            </dd>
          </dl>
        </div>

        <dl class="kv">
          <dt>
            <label>{$Think.lang.sendToEmail}：</label>
          </dt>
          <dd>
            <input type="email" class="input-text" name="testSendEmailTo" id="testSendEmailTo" />
            <a href="javascript:;" id="J_send" class="disabled">{$Think.lang.sendTestEmail}</a>
            <div class="kv-error"></div>
          </dd>
        </dl>
        <div class="actions">
          <input class="btn btn-y" type="submit" name="" value="{$Think.lang.OK}" />
        </div>
      </form>
    </div>

  </div>
</body>

</html>
